Skip to content

fix: skip sync jobs on dependabot branches even when actor is not dependabot#467

Merged
rajbos merged 2 commits intomainfrom
copilot/skip-jobs-for-dependabot
Mar 22, 2026
Merged

fix: skip sync jobs on dependabot branches even when actor is not dependabot#467
rajbos merged 2 commits intomainfrom
copilot/skip-jobs-for-dependabot

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 22, 2026

Problem

The Sync Copilot Models / sync-models and Sync Tool Names from vscode-copilot-chat / sync-toolnames jobs fail on dependabot PR branches when main is merged into them.

The existing if: github.actor != 'dependabot[bot]' condition only catches direct dependabot pushes. When a repo owner merges main into a dependabot branch, the actor becomes the owner (rajbos) — yet secrets.GH_PAT is still unavailable on dependabot branches, causing the "Authenticate GitHub CLI" step to fail.

Example failing runs:

Fix

Added !startsWith(github.ref_name, 'dependabot/') to the job if conditions in both workflows, so the sync jobs are skipped on any push to a dependabot/* branch, regardless of the triggering actor.

Before

if: github.actor != 'dependabot[bot]'

After

if: github.actor != 'dependabot[bot]' && !startsWith(github.ref_name, 'dependabot/')

@rajbos rajbos marked this pull request as ready for review March 22, 2026 15:57
@rajbos rajbos enabled auto-merge (squash) March 22, 2026 15:57
@rajbos rajbos merged commit f82509d into main Mar 22, 2026
18 checks passed
@rajbos rajbos deleted the copilot/skip-jobs-for-dependabot branch March 22, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants